package com.lee.dubbo.service.controller;

import com.lee.dubbo.service.domain.City;
import com.lee.dubbo.service.dubbo.DubboConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by liping on 2017/10/31.
 */
@RestController
public class TestController {
    @Autowired
    DubboConsumerService dubboConsumerService;

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public Object test() {
        City city = dubboConsumerService.printCity();
        return city;
    }
}
